---
#==============================================================#
# File      :   infrastructure.yml
# Ctime     :   2020-04-03
# Mtime     :   2021-06-23
# Desc      :   Infrastructure Targets definition for prometheus
# Path      :   /etc/prometheus/targets/infra/targets.yml
# Copyright (C) 2018-2021 Ruohang Feng
#==============================================================#

# TODO: Change this file according to your need


#------------------------------------------------------------------------------
# Grafana (3000)
#------------------------------------------------------------------------------
- labels: { type: grafana }
  targets: # [ 127.0.0.1:3000 ]
    - {{ nginx_upstream | json_query('[?name==`grafana`].endpoint') | first }}

#------------------------------------------------------------------------------
# Prometheus (9090)
#------------------------------------------------------------------------------
- labels: { type: prometheus }
  targets: # [ 127.0.0.1:9090 ]
    - {{ nginx_upstream | json_query('[?name==`prometheus`].endpoint') | first }}

#------------------------------------------------------------------------------
# AlertManager (9093)
#------------------------------------------------------------------------------
- labels: { type: alertmanager }
  targets: # [ 127.0.0.1:9093 ]
    - {{ nginx_upstream | json_query('[?name==`alertmanager`].endpoint') | first }}

#------------------------------------------------------------------------------
# Nginx Exporter (9113)
#------------------------------------------------------------------------------
- labels: { type: nginx }
  targets: [ 127.0.0.1:9113 ]

#------------------------------------------------------------------------------
# Consul (TODO)
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Etcd (TODO)
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Misc (TODO)
#------------------------------------------------------------------------------
